Start Model Execution
The Start Execution endpoint allows you to automate the execution of a model run.
In the POST
request, you can enter parameter values to control the configuration of a model run, for example, which suite of snippets to run. You must specify the:
model_id
for an exploratory run, which is useful when you're building a model.model_id
andtest_case_id
for a fully-configured model. If you start a run with only these two parameters, the model runs without connecting to any Eggplant Functional scripts and only generates a path through the model.
ノート
If you want to connect to an Eggplant Functional suite, you must use the agent to establish that connection, and give values for the parameters in the agent
object.
Method
POST -> http://localhost:8000/execution_service/api/v1/executions
You can also explore the Start Execution endpoint in Swagger:
http://localhost:8000/execution_service/docs#/Execution/start_execution_execution_service_api_v1_executions_post
Headers
Name | Value |
---|---|
Authorization | bearer <access_token> |
Content-Type | application/json |
Body Parameters
To execute a model run, you must send a value for at least one of these parameters: model_id
, rerun_id
or script
.
Name | Type | Description | Required |
---|---|---|---|
execution_type | enumeration | For an execution run, the value is always executing . | |
model_id | string | UUID of the model to use for an exploratory or test case run. | Yes |
agent | object | Agent that is used for the model run. | No. If null then no agent is used. |
agent_id | string | ID of the agent connection to use. | No |
is_hosted_agent | boolean | Whether the agent is hosted or on the local machine. | No |
test_case_id | integer | ID of the test case to execute for a test case run. | No |
script | string | Name of the script to use for a script-based run. | No |
asset | object | Details of the test assets to use for test execution. | No. If null then a model run without snippets is executed. |
asset_version_id | string | ID of the asset version to use. | No |
asset_path | string | Path of the suite to use on the connected agent. | No |
sut | object | Details of the SUT to use. | No |
sut_id | string | ID of the SUT. | No |
criteria | array of strings | Criteria or tag of the SUT to lock. You can use this instead of the sut_id . | No |
rerun_id | integer | For a rerun, this is the test case ID of the original model run. | No |
step_pause_time | integer | For internal use only. | No |
Possible Responses
Status | Status Text | Description |
---|---|---|
200 | Successful response | Execution started. |
400 | Bad request | Required parameters were not sent. |
401 | Unauthorized | The access token was not valid. |
403 | Access denied | Server denies access from the resource. |
422 | Validation error | Incorrect parameters were sent. |
503 | RabbitMQ is not available | Request cannot be completed because the message service is unavailable. |
Response Body JSON
Successful response – Status 200 returns the ID of the model execution that has started.
Example:
{
"execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}